﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Editoriales.aspx.cs" Inherits="Bukstor.Admin.UI.Editoriales"
    MasterPageFile="~/MasterAdmin.Master" Theme="SkinAdmin" %>

<asp:Content ContentPlaceHolderID="head" runat="server">
    <title>Editoriales</title>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <div>
            <div align="center">
                <asp:Label ID="lblEditorial" runat="server" Text="Nombre Editorial" ForeColor="#990033"
                    BorderColor="#993333"></asp:Label></div>
            <div align="center">
                <div><asp:TextBox ID="txtEditorial" runat="server" Width="169px" 
                    ValidationGroup="Editoriales" style="margin-left: 0px"></asp:TextBox></div>
                <div align="center">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage=""
                        Text="* Falta seleccionar un Editorial" ControlToValidate="txtEditorial" ValidationGroup="Editoriales"></asp:RequiredFieldValidator></div>
            </div>
        </div>
        <div align="center">
            <asp:Button ID="btnAlta" runat="server" Text="CREAR EL EDITORIAL" ValidationGroup="Editoriales"
                OnClick="btnAlta_Click1" /></div>
        <div align="center">
            <br />
            <asp:Button ID="btnTitulos" runat="server" Text="A TITULOS" PostBackUrl="~/Titulos.aspx" /></div>
        <br />
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server">
        <asp:GridView ID="GridView1" runat="server" DataSourceID="EntityDataSourceEditoriales"
            OnSelectedIndexChanged="GridView1_SelectedIndexChanged" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="id">
            <Columns>
                <asp:CommandField ShowEditButton="True" ButtonType="Image" 
                    CancelImageUrl="~/Imagenes/icoCancel.jpeg" 
                    EditImageUrl="~/Imagenes/icoEditar.gif" HeaderText="Editar" 
                    UpdateImageUrl="~/Imagenes/icoOk.jpeg" />
                <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />
                <asp:BoundField DataField="nombre" HeaderText="nombre" SortExpression="nombre" />
            </Columns>
        </asp:GridView>
    </asp:Panel>
    <asp:EntityDataSource ID="EntityDataSourceEditoriales" runat="server" ConnectionString="name=BukstorBDEntities"
        DefaultContainerName="BukstorBDEntities" EnableFlattening="False" EntitySetName="Editoriales"
        EnableInsert="True" EnableUpdate="True">
    </asp:EntityDataSource>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowSummary="true"
        ValidationGroup="Editoriales" />
</asp:Content>
